package com.luoran.car.util;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.luoran.car.domain.Vehicle;
import com.luoran.car.service.VehicleService;

public class CellDataDemoHeadDataListenerVehicle implements ReadListener<Vehicle> {

    private VehicleService vehicleService;

    public CellDataDemoHeadDataListenerVehicle(VehicleService vehicleService) {
        this.vehicleService = vehicleService;
    }


    @Override
    public void invoke(Vehicle vehicle, AnalysisContext analysisContext) {
        vehicleService.add(vehicle);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.out.println("解析之后的方法");
    }
}
